package com.fgw.controller.portal;

import com.fgw.common.ServerResponse;
import com.fgw.pojo.Onlinedata;
import com.fgw.service.IOnlineDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


/**
 * Created by lyj on 2017/9/14.
 */
@Controller
@RequestMapping("/OnlineData/")
public class OnlineDataController {

    @Autowired
    private IOnlineDataService iOnlineDataService;

    /**
     * 在线资料title列表Controller
     * @return
     */
    @RequestMapping(value = "list.do",method = RequestMethod.GET)
    @ResponseBody
    public ServerResponse<List<Onlinedata>> getTitleOnlineData(){

        return  iOnlineDataService.getTitleOnlineData();
    }
}
